const ffi = require('ffi-napi')

module.exports = function CheckGameIsRunning() {
	const Monitor = new ffi.Library('user32.dll', {
		'FindWindowA': ['int', ['string', 'string']]
	})
	return new Promise((resolve, reject) => {
		Monitor.FindWindowA.async('WindowsForms10.Window.8.app.0.293a9a3_r14_ad1', null, (err, value) => {
			if (err) {
				reject(err)
				return;
			}
			resolve(value)


		})
	})

}